/**
 * 
 */
package com.dalonedrau.graph;

import com.dalonedrau.vectors.Vector2;

/**
 * @author Donald
 *
 */
public class NavGraphNode extends GraphNode {
	/** the <code>NavGraphNode</code>'s position. */
	private Vector2 position;

	/**
	 * Creates a new instance of {@link NavGraphNode}.
	 * @param ind the index to set
	 * @param pos the position to set
	 * @throws Exception if the index <= 0
	 */
	protected NavGraphNode(final int ind, final Vector2 pos) throws Exception {
		super(ind);
		position = pos;
	}
	public boolean equals(final Vector2 v2) {
		return position.equals(v2);
	}
	public boolean equals(final double x, final double y) {
		boolean equals = false;;
		if (x == position.getX()
				&& y == position.getY()) {
			equals = true;
		}
		return equals;
	}
	/**
	 * Gets the position.
	 * @return {@link Vector2}
	 */
	public final Vector2 getPosition() {
		return position;
	}
}
